package com.liang.index334.core;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;

import java.util.ArrayList;
import java.util.List;

/**
 * @author liangyehao
 * @version 1.0
 * @date 2021/5/1 19:28
 * @content
 */
public abstract class AbstractListener<T> extends AnalysisEventListener<T> {
    private List<T> list = new ArrayList<>();

    @Override
    public void invoke(T originData, AnalysisContext analysisContext) {
        list.add(originData);
    }

    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {

    }

    public List<T> getList() {
        return list;
    }

}
